package com.ruoyi.tongyan.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tongyan.mapper.SysUserNoticeMapper;
import com.ruoyi.tongyan.domain.SysUserNotice;
import com.ruoyi.tongyan.service.ISysUserNoticeService;

/**
 * 用户‑通知映射Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class SysUserNoticeServiceImpl implements ISysUserNoticeService 
{
    @Autowired
    private SysUserNoticeMapper sysUserNoticeMapper;

    /**
     * 查询用户‑通知映射
     * 
     * @param id 用户‑通知映射主键
     * @return 用户‑通知映射
     */
    @Override
    public SysUserNotice selectSysUserNoticeById(Long id)
    {
        return sysUserNoticeMapper.selectSysUserNoticeById(id);
    }

    /**
     * 查询用户‑通知映射列表
     * 
     * @param sysUserNotice 用户‑通知映射
     * @return 用户‑通知映射
     */
    @Override
    public List<SysUserNotice> selectSysUserNoticeList(SysUserNotice sysUserNotice)
    {
        return sysUserNoticeMapper.selectSysUserNoticeList(sysUserNotice);
    }

    /**
     * 新增用户‑通知映射
     * 
     * @param sysUserNotice 用户‑通知映射
     * @return 结果
     */
    @Override
    public int insertSysUserNotice(SysUserNotice sysUserNotice)
    {
        sysUserNotice.setCreateTime(DateUtils.getNowDate());
        return sysUserNoticeMapper.insertSysUserNotice(sysUserNotice);
    }

    /**
     * 修改用户‑通知映射
     * 
     * @param sysUserNotice 用户‑通知映射
     * @return 结果
     */
    @Override
    public int updateSysUserNotice(SysUserNotice sysUserNotice)
    {
        return sysUserNoticeMapper.updateSysUserNotice(sysUserNotice);
    }

    /**
     * 批量删除用户‑通知映射
     * 
     * @param ids 需要删除的用户‑通知映射主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNoticeByIds(Long[] ids)
    {
        return sysUserNoticeMapper.deleteSysUserNoticeByIds(ids);
    }

    /**
     * 删除用户‑通知映射信息
     * 
     * @param id 用户‑通知映射主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNoticeById(Long id)
    {
        return sysUserNoticeMapper.deleteSysUserNoticeById(id);
    }
}
